import { useLocation, useNavigate, useParams } from 'react-router-dom'

export default function withRouter(Component) {
  return (props) => {
    return (
      <Component
        {...props}
        location={useLocation}
        navigate={useNavigate}
        params={useParams}
      />
    )
  }
}
